<template>
	<view class="count">
		<view class="bg"></view>
		<view class="bg-circle"></view>
		<view class="" style="text-align: center;margin-top: 60rpx;">
			累计收入
		</view>
		<view class="mt20" style="text-align: center;font-size: 74rpx;font-weight: bold;">
			{{total_money||0.00}}
		</view>
		<view class=""
			style="width: 100%;height: 80vh; position: absolute;top: 140rpx;z-index: 2;display: flex;flex-direction: column;justify-content: space-evenly;">
			<view class=" radius20 bgwhite" style="width: 94%;margin:0 auto;padding: 40rpx 60rpx;">
				<view class="" style="margin:20rpx 0;">
					<text>今日数据</text>
					<image src="@/static/users/11.png" mode=""
						style="width: 30rpx; height: 30rpx;vertical-align: middle;padding-left: 10rpx;"></image>
				</view>
				<view class="" style="display: flex;justify-content: space-between;text-align: center;">
					<view class="">
						<text style="color: black;font-weight: bold;font-size: 74rpx;">{{money||0.00}}</text>
						<view class="" style="margin-top: 30rpx;">
							今日收入
						</view>
					</view>
					<view class="">
						<text style="color: black;font-weight: bold;font-size: 74rpx;">{{total||0.00}}</text>
						<view class="" style="margin-top: 30rpx;">
							今日接单
						</view>
					</view>
					<view class="">
						<text style="color: black;font-weight: bold;font-size: 74rpx;">{{wang||0.00}}</text>
						<view class="" style="margin-top: 30rpx;">
							今日完工
						</view>
					</view>
				</view>
			</view>
			<view class=" radius20 bgwhite" style="width: 94%;margin:0 auto;padding: 40rpx 60rpx;">
				<view class="" style="margin:20rpx 0;">
					<text>本周数据</text>
					<image src="@/static/users/11.png" mode=""
						style="width: 30rpx; height: 30rpx;vertical-align: middle;padding-left: 10rpx;"></image>
				</view>
				<view class="" style="display: flex;justify-content: space-between;text-align: center;">
					<view class="">
						<text style="color: black;font-weight: bold;font-size: 74rpx;">{{week_money||0.00}}</text>
						<view class="" style="margin-top: 30rpx;">
							本周收入
						</view>
					</view>
					<view class="">
						<text style="color: black;font-weight: bold;font-size: 74rpx;">{{week_total||0.00}}</text>
						<view class="" style="margin-top: 30rpx;">
							本周接单
						</view>
					</view>
					<view class="">
						<text style="color: black;font-weight: bold;font-size: 74rpx;">{{week_wang||0.00}}</text>
						<view class="" style="margin-top: 30rpx;">
							本周完工
						</view>
					</view>
				</view>
			</view>
			<view class=" radius20 bgwhite" style="width: 94%;margin:0 auto;padding: 40rpx 60rpx;">
				<view class="" style="margin:20rpx 0;">
					<text>本月数据</text>
					<image src="@/static/users/11.png" mode=""
						style="width: 30rpx; height: 30rpx;vertical-align: middle;padding-left: 10rpx;"></image>
				</view>
				<view class="" style="display: flex;justify-content: space-between;text-align: center;">
					<view class="">
						<text style="color: black;font-weight: bold;font-size: 74rpx;">{{month_money||0}}</text>
						<view class="" style="margin-top: 30rpx;">
							本月收入
						</view>
					</view>
					<view class="">
						<text style="color: black;font-weight: bold;font-size: 74rpx;">{{month_total||0}}</text>
						<view class="" style="margin-top: 30rpx;">
							本月接单
						</view>
					</view>
					<view class="">
						<text style="color: black;font-weight: bold;font-size: 74rpx;">{{month_wang||0}}</text>
						<view class="" style="margin-top: 30rpx;">
							本月完工
						</view>
					</view>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	import {
		orderCount
	} from '@/common/teacherReq';
	export default {
		data() {
			return {
				money: 0,
				month_money: 0,
				month_total: 0,
				month_wang: 0,
				total: 0,
				wang: 0,
				week_money: 0,
				week_total: 0,
				week_wang: 0,
				total_money:0,
			}
		},
		methods: {

		},
		onLoad() {
			orderCount({}).then(res => {
				// 直接将 res 的数据合并到 this 的 data 中
				Object.assign(this.$data, res.data.order);
			})
		}
	}
</script>

<style lang="scss" scoped>
	.count {
		position: relative;

		.bg {
			width: 100%;
			position: absolute;
			height: 170rpx;
			background-color: $uni-color-primary;
			z-index: -1;
		}

		.bg-circle {
			width: 1200rpx;
			position: absolute;
			height: 866rpx;
			background-color: $uni-color-primary;
			// background-color: #000;
			z-index: -2;
			border-radius: 50%;
			top: -590rpx;
			left: -236rpx;
			overflow-x: hidden !important;
		}
	}
</style>